package task;

import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

import util.BackUp;

/**
 *
 * @author Tony Shen
 */
public class PickTask {

    private Timer timer;

    public PickTask() {
        timer = new Timer();
    }
    private TimerTask task = new TimerTask() {

        public void run() {
            BackUp.backup(); //执行文件备份
        }
    };

    public void start(Date date) {
        timer.schedule(task, date);
    }
}


